<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored ="false"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>北京市电子行政监察平台-新增数据规则权限资源集</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link href="<%=path%>/css/base.css" rel="stylesheet" type="text/css" />
		<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css" />
		<link href="<%=path%>/css/frame.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
			var path = "<%=path%>";
		</script>
		<script type="text/javascript" src="<%=path%>/javascript/core/jquery-1.6.1.min.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/core/jquery.metadata.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/core/jquery-jtemplates.pack.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/core/jquery.validate.fixed.pack.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/config/config.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/system/util.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/system/oacore.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/system/init.js"></script>
		<script type="text/javascript">
			var requestCounter = 0;
			$(function () {
				$("#orderNumber").data("otherParams", "_${resourcePermissionDTO.resourceId}");
				var validator = $("#creatorForm").validate();
			});
		</script>
		<style type="text/css">
			div {
				position: static;
			}
		</style>
	</head>
	<body>
		<div id="mainPage" class="surround-layout">
			<jsp:include page="../frame/top.jsp" flush="true"></jsp:include>
			<div class="middle">
				<jsp:include page="../frame/middle_left.jsp" flush="true">
					<jsp:param value="1026-1033" name="view"/>
				</jsp:include>
				<!-- 右侧输出内容 -->
				<div class="right">
					<div class="right-all-content">
						<div>
							<div class="content-line-wrap">
								<div class="content-line-left content-line">
									<h1 class="content-title">
										<span>
											<a href="<%=path %>/web/initResourceByPageAction.action">数据权限规则管理</a>
										</span>
										<span>
											&gt;&gt;
										</span>
										<span>
											<a href="<%=path %>/web/findResourceByIdAction.action?rid=${ruleDTO.resourceId}">编辑资源集</a>
										</span>
										<span>
											&gt;&gt;
										</span>
										<span>
											<a href="<%=path %>/web/initAddRuleAction?resourceId=${ruleDTO.resourceId}">新增规则</a>
										</span>
									</h1>
								</div>
							</div>
							<div class="inner-dialog">
								<h1 class="inner-dialog-title">新增资源集</h1>
								<div class="inner-dialog-content">
									<!-- 填入action地址 -->
									<form method="post" action="<%=path%>/web/addRuleAction.action" name="creatorForm" id="creatorForm" class="normal-form">
										<table>
											<tr>
												<td>
													<span class="form-field">资源集名:</span>
													<input type="text" name="ruleDTO.resourceName" value="${ruleDTO.resourceName}" readonly="readonly" class="shadow nf-double-cell shadow"/>
												</td>
											</tr>
											<tr>
												<td>
													<span  class="form-field"><span class="important-field-star">*</span>规 则 名:</span>
													<s:text name=""></s:text>
													<input type="text" value="${ruleDTO.ruleName}" name="ruleDTO.ruleName" class="shadow nf-double-cell {required: true, maxlength: 32, messages: {required: '必填项', maxlength: '规则名称不能超过32个字符'}}"/>
												</td>
											</tr>
											<tr>
												<td>
													<span  class="form-field"><span class="important-field-star">*</span>规则顺序:</span>
													<s:if test="ruleDTO.ruleOrder==0">
										<input type="text" name="ruleDTO.ruleOrder" id="orderNumber" class="shadow nf-single-cell {required: true, number: true, dataUnique: ACTIONS.AUTH_ORDNUMBER_UNIQUE, messages: {required: '必填项', number: '规则顺序必须为数字', dataUnique: '您输入的排序号已存在'}}"/>
													</s:if>
													<s:else>
					                    <input type="text" name="ruleDTO.ruleOrder" value="${ruleDTO.ruleOrder}" id="orderNumber" class="shadow nf-single-cell {dataUnique: ACTIONS.AUTH_ORDNUMBER_UNIQUE, required: true, number: true, messages: {required: '必填项', number: '规则顺序必须为数字', dataUnique: '您输入的排序号已存在'}}"/>
													</s:else>
												</td>
											</tr>
											<tr>
												<td>
													<span  class="form-field"><span class="important-field-star">*</span>状　　态:</span>
													<s:if test='ruleDTO.ruleState=="E"'>
													<input type="radio" name="ruleDTO.ruleState" value="E" checked="checked"/>启用
													<input type="radio" name="ruleDTO.ruleState" value="D"/>禁用
													</s:if>
													<s:elseif test='ruleDTO.ruleState=="D"'>				
													<input type="radio" name="ruleDTO.ruleState" value="E"/>启用
													<input type="radio" name="ruleDTO.ruleState" value="D" checked="checked"/>禁用	
													</s:elseif>
													<s:else>				
													<input type="radio" name="ruleDTO.ruleState" value="E" checked="checked"/>启用
													<input type="radio" name="ruleDTO.ruleState" value="D"/>禁用	
													</s:else>
												</td>
											</tr>
											<tr>
												<td>
													<span  class="form-field"><span class="important-field-star">*</span>如　　果:</span>
													<textarea class="shadow nf-double-cell {required: true, messages: {required: '必填项'}}" name="ruleDTO.ifExpression">${ruleDTO.ifExpression}</textarea>
												</td>
											</tr>
											<tr> 
												<td>
													<span  class="form-field"><span class="important-field-star">*</span>那　　么:</span>
													<textarea class="shadow nf-double-cell {required: true, messages: {required: '必填项'}}" name="ruleDTO.thenExpression">${ruleDTO.thenExpression}</textarea>
												</td>
											</tr>
										</table>
										<input type="hidden" name="ruleDTO.resourceId" value="${ruleDTO.resourceId}">
										<table>
											<tr>
												<td>
													<input type="submit" value="保存" class="special originate"></input>
												</td>
											</tr>
										</table>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
				<!--  -->
			</div>
		</div>
	</body>
</html>